package com.example.facadepattern.entity;

/**
 * @author ash
 * @description 外观类
 * @create 2023/2/12  22:11:42
 * @className Facade
 * @verson 1.0.0
 */
public class Facade {

    private final System1 system1;

    private final System2 system2;

    private final System3 system3;

    public Facade() {
        this.system1 = new System1();
        this.system2 = new System2();
        this.system3 = new System3();
    }

    public void MethodA(){
        System.out.println("调用方案组A");
        system1.getSystem1();
        system3.getSystem3();
    }

    public void MethodB(){
        System.out.println("调用方案组B");
        system2.getSystem2();
        system1.getSystem1();
    }
}
